import http from '@src/util/HttpUtil';
 let prefix = '/api/part'
/** 
 * @description 校验是否需要高级审批
 * @param {Object} params 参数对象
 */
export function checkNeedVipApprove(params: {} | undefined) {
  return http.post(`${prefix}/outside/sparepart/checkNeedVipApprove`, params)
}

/** 
 * @description 初始化出入库高级审批
 * @param {Object} params.type 出库类型-工单出库:2
 */
export function createVipApproveFlow(params: {} | undefined) {
  return http.post(`${prefix}/outside/sparepart/createVipApproveFlow`, params)
}

/** 
 * @description 发起办理出库(高级审批)
 * @param {Object} params.inventoryApproveForm 出入库数据
 */
export function approveCreate(params: {} | undefined) {
  return http.post(`${prefix}/outside/sparepart/approveCreate`, params)
}

/** 
 * @description 获取审批信息(高级审批)
 * @param {Object} params.approveId 流程id
 * @param {Object} params.taskId 工单id
 */
export function getApproveLoad(params: {} | undefined) {
  return http.post(`${prefix}/outside/sparepart/getApproveLoad`, params)
}

/** 
 * @description 保存审批信息(高级审批)
 */
export function approveSubmit(params: {} | undefined, query: string) {
  return http.post(`${prefix}/outside/sparepart/approveSubmit${query}`, params)
}